package simplescenegraph;

import simplescenegraph.assets.Texture;
import simplescenegraph.math.Color4f;

public final class Material {
	
	public static final Color4f DEFAULT_AMBIENT_COLOR = new Color4f(0.2f, 0.2f, 0.2f, 1);
	
	public static final Color4f DEFAULT_DIFFUSE_COLOR = new Color4f(0.8f, 0.8f, 0.8f, 1);
		
	public static final Color4f DEFAULT_SPECULAR_COLOR = new Color4f(0, 0, 0, 1);
	
	private String name;
	
	private Color4f ambient;
	
	private Color4f diffuse;
	
	private Color4f specular;
	
	private float shininess = 0.0f;

	private Texture texture;
	
	private boolean useTexture;

	public Material(String name) {
		this.name = name;
		ambient = DEFAULT_AMBIENT_COLOR;
		diffuse = DEFAULT_DIFFUSE_COLOR;
		specular = DEFAULT_SPECULAR_COLOR;
		texture = null;
		useTexture = true;
	}
	
	public Color4f getAmbient() {
		return ambient;
	}

	public void setAmbient(Color4f ambient) {
		this.ambient = ambient;
	}

	public Color4f getDiffuse() {
		return diffuse;
	}

	public void setDiffuse(Color4f diffuse) {
		this.diffuse = diffuse;
	}

	public Color4f getSpecular() {
		return specular;
	}

	public void setSpecular(Color4f specular) {
		this.specular = specular;
	}

	public float getShininess() {
		return shininess;
	}

	public void setShininess(float shininess) {
		this.shininess = shininess;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Texture getTexture() {
		return texture;
	}

	public void setTexture(Texture texture) {
		this.texture = texture;
	}
	
	public boolean isTextureEnabled() {
		return useTexture;
	}

	public void enableTexture(boolean enableTexture) {
		useTexture = enableTexture;
	}	
	
}
